<template>
  <div id="app">
  <el-container>
    <el-aside width="200px">
      <side></side>
    </el-aside>
    <el-main>
      <router-view v-if="isRouterAlive"/>
    </el-main>
</el-container>
</div>
</template>

<script>
import side from './components/side'
export default {
  components:{
    side
  },
  name: 'App',
  provide(){
    return{
      // reload:this.reload
      name:this.name,
      reload:this.reload,
      test:this.test
    }
  },
  data() {
      return {
       isRouterAlive:true,
       name:'cyw'
      }
    },
    created(){
      console.log('111')
      console.log(this.reload)
    },
    methods: {
     reload(){
      this.isRouterAlive = false
      this.$nextTick(function(){
        this.isRouterAlive = true
      })
     },
     test(){
      console.log('test')
     }
    }
}
</script>

<style>
</style>
